<template>
  <div>父传子-{{title}} <button @click="handleAdd">加一</button></div>
  <child-hooks :title="title"></child-hooks>
</template>

<script>
import { ref } from 'vue'
import ChildHooks from './components/ChildHooks.vue'
export default {
  components: {
    ChildHooks
  },
  setup () {
    const title = ref('首页')
    const handleAdd = () => { title.value = title.value + '1' }
    return {
      title,
      handleAdd
    }
  }
}
</script>
